﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MenuTinTuc.ascx.cs" Inherits="UserControl_MenuTinTuc" %>
<style type="text/css">
    .style12
    {
        width: 180px;
    }
</style>
<asp:DataList ID="DataList1" runat="server" DataKeyField="ID" DataSourceID="SqlDataSourceTinTuc"
    Width="100%">
    <ItemTemplate>
        <table class="style12">
            <tr>
                <td style="vertical-align: top; text-align: center">
                    <asp:Image ID="Image1" runat="server" Height="45px" ImageUrl='<%# Eval("HinhAnh") %>'
                        Width="45px" />
                </td>
                <td style="vertical-align: top; text-align: left" valign="top">
                    <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" Font-Underline="False"
                        ForeColor="#3399FF" NavigateUrl='<%# Eval("ID", "../News.aspx?ID={0}") %>' Text='<%# Eval("TieuDe", "{0}...") %>'></asp:HyperLink>
                    <br />
                    <asp:HyperLink ID="HyperLink2" runat="server" Font-Italic="True" Font-Size="10px"
                        Font-Underline="False" ForeColor="Gray" NavigateUrl='<%# Eval("ID", "../News.aspx?ID={0}") %>'>Đọc tiếp...</asp:HyperLink>
                    &nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2" style="vertical-align: top; text-align: center">
                    <asp:Label ID="Label1" runat="server" Font-Italic="True" Font-Size="11px" 
                        ForeColor="#FF6600" Text='<%# Eval("NgayDang", "{0:D}") %>'></asp:Label>
                    &nbsp;
                </td>
            </tr>
        </table>
    </ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSourceTinTuc" runat="server" ConnectionString="<%$ ConnectionStrings:KinhMatConnecString %>"
    SelectCommand="SELECT TOP (5) TinTuc.ID, TinTuc.TieuDe, TinTuc.NoiDung, TinTuc.NgayDang, TinTuc.NguoiDang, TinTuc.HinhAnh, TinTuc.GioiThieu FROM TinTuc   ORDER BY TinTuc.ID DESC">
</asp:SqlDataSource>
<p style="text-align: right">
    <asp:HyperLink ID="HyperLink3" runat="server" Font-Size="11px" Font-Underline="False"
        ForeColor="#0066FF" NavigateUrl="~/News.aspx">Xem toàn bộ &gt;&gt;</asp:HyperLink>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
